//
//  NaviController.h
//  FunnyProject
//
//  Created by LYL on 3/24/13.
//  Copyright (c) 2013 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MSNaviBar,NViewController;

@interface MSNaviController : UIViewController
{
    MSNaviBar *_navibar;
    UIView *_containerView;
}

@property (retain, nonatomic) NSArray *viewControllers;
@property(nonatomic,readonly,retain) NViewController *topViewController; // The top view controller on the stack.
@property(nonatomic,readonly,retain) NViewController *visibleViewController; // Return modal view controller if it exists. Otherwise the top view controller.

- (id)initWithRootViewController:(NViewController *)controller;

- (void)pushViewController:(NViewController *)controller animated:(BOOL)animated;

- (void)popViewControllerAnimated:(BOOL)animated;

- (void)popToRootViewControllerAnimated:(BOOL)animated;

- (void)setViewControllers:(NSArray *)controllers animated:(BOOL)animated; // If animated is YES, then simulate a push or pop depending on whether the new top view controller was previously in the stack.

- (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated; // Hide or show the navigation bar. If animated, it will transition vertically using UINavigationControllerHideShowBarDuration.

@end


@interface NViewController : UIViewController
@property (retain,readonly, nonatomic) MSNaviController *navi;
@end